<template>
  <div class="basic-box">
    <el-row>
      <el-breadcrumb separator="/">
        <el-breadcrumb-item>
          <router-link to="/index"> 主页</router-link>
        </el-breadcrumb-item>
        <el-breadcrumb-item>档案管理</el-breadcrumb-item>
        <el-breadcrumb-item>基本信息</el-breadcrumb-item>
      </el-breadcrumb>
    </el-row>
    <el-row>搜索区</el-row>
    <el-row>
      <el-table :data="list">
        <el-table-column prop="name" label="员工姓名"></el-table-column>
        <el-table-column prop="dept" label="员工部门"></el-table-column>
      </el-table>

    </el-row>


    <el-button @click="btnAddClick">添加</el-button>
    <el-button>修改</el-button>
    <el-button>删除</el-button>
  </div>
</template>

<script>
export default {
  name: "Basic",
  data() {
    return {
      name: '你好',
      list: [],
      employee: {
        name: '洪',
        gender: '男'
      }
    }
  }, mounted() {

    this.axios({
      url: 'http://localhost:8088/doc2/list/' + this.name,
      method: 'get',
      dataType: 'json'
    }).then((res) => {
      this.list = res.data.data;
    })

  }, methods: {
    btnAddClick() {
      this.axios({
        url: 'http://localhost:8088/doc2/remove/'+1,
        method: 'delete',
        dataType: 'json',

      }).then(res=>alert(res.data))
    }
  }
}
</script>

<style scoped>

.basic-box {
  padding: 10px;
}

</style>